home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC]
/
NeXTSTEP 3.3 Dev Intel.iso
/
NextDeveloper
/
Headers
/
netinfo
/
_lu_types.x
next >
Wrap
Text File
|
1990-01-22
|
5KB
|
218 lines
/*
* Lookup server protocol - Internal to NeXT
* Copyright (C) 1989 by NeXT, Inc.
*
* This server uses a protocol based upon XDR layered on top of
* a mach rpc call. There are three procedures defined in the "lookup.defs"
* file. A "lookup_link" operation takes a procedure string name and returns a
* number to be used in the other two calls. "lookup_all" takes a procedure
* number and XDR'd arguments and returns XDR'd results. It returns the
* entire list of entries. "lookup_one" has a similar calling convention,
* but returns only a single entry.
*
* The syntax of calls described here in comments looks like this:
*
* result_type procedure_name(arg_type1 arg1, arg_type2 arg2, ...)
*
* The arguments are assumed to be XDR'd in sequence and a single XDR'd
* result is returned.
*/
const _LU_MAXLUSTRLEN = 256;
const _LU_MAXGRP = 256;
const _LU_MAXHNAMES = 32;
const _LU_MAXADDRS = 32;
const _LU_MAXNNAMES = 32;
const _LU_MAXPNAMES = 32;
const _LU_MAXSNAMES = 32;
const _LU_MAXRNAMES = 32;
const _LU_MAXPRNAMES = 32;
const _LU_MAXPRPROPS = 1024;
const _LU_MAX_BOOTPARAMS_KV = 32;
const _LU_MAXALIASMEMBERS = 1024;
typedef string _lu_string<_LU_MAXLUSTRLEN>;
/*
* Calls available:
* int putpwpasswd(_lu_string long, _lu_string old, _lu_string new)
* _lu_passwd * getpwuid(int uid)
* _lu_passwd * getpwnam(_lu_string name)
* _lu_passwd<> getpwent(void)
*/
struct _lu_passwd {
_lu_string pw_name;
_lu_string pw_passwd;
int pw_uid;
int pw_gid;
_lu_string pw_gecos;
_lu_string pw_dir;
_lu_string pw_shell;
};
typedef _lu_passwd *_lu_passwd_ptr;
/*
* Calls available:
* _lu_group * getgrgid(int gid)
* _lu_group * getgrnam(_lu_string name)
* _lu_group<> getgrent(void)
*/
struct _lu_group {
_lu_string gr_name;
_lu_string gr_passwd;
int gr_gid;
_lu_string gr_mem<_LU_MAXGRP>;
};
typedef _lu_group *_lu_group_ptr;
/*
* Calls available:
* _lu_hostent * gethostbyaddr(unsigned long addr) -- IP only
* _lu_hostent * gethostbyname(_lu_string name)
* _lu_hostent<> gethostent(void)
*/
struct _lu_hostent {
_lu_string h_names<_LU_MAXHNAMES>;
unsigned long h_addrs<_LU_MAXADDRS>; /* IP only */
};
typedef _lu_hostent *_lu_hostent_ptr;
/*
* Calls available:
* _lu_netent * getnetbyaddr(unsigned long addr) --IP only
* _lu_netent * getnetbyname(_lu_string name)
* _lu_netent<> getnetent(void)
*/
struct _lu_netent {
_lu_string n_names<_LU_MAXNNAMES>;
unsigned long n_net; /* IP only */
};
typedef _lu_netent *_lu_netent_ptr;
/*
* Calls available:
* _lu_servent * getservbyport(int port, _lu_string proto)
* _lu_servent * getservbyname(_lu_string name, _lu_string proto)
* _lu_servent<> getservent(void)
*/
struct _lu_servent {
_lu_string s_names<_LU_MAXSNAMES>;
int s_port;
_lu_string s_proto;
};
typedef _lu_servent *_lu_servent_ptr;
/*
* Calls available:
* _lu_protoent * getprotobynumber(int number)
* _lu_protoent * getprotobyname(_lu_string name)
* _lu_protoent<> getprotoent(void)
*/
struct _lu_protoent {
_lu_string p_names<_LU_MAXPNAMES>;
int p_proto;
};
typedef _lu_protoent *_lu_protoent_ptr;
/*
* Calls available:
* _lu_rpcent * getrpcbynumber(int number)
* _lu_rpcent * getrpcbyname(_lu_string name)
* _lu_rpcent<> getrpcent(void)
*/
struct _lu_rpcent {
_lu_string r_names<_LU_MAXRNAMES>;
int r_number;
};
typedef _lu_rpcent *_lu_rpcent_ptr;
/*
* Calls available:
* _lu_mntent<> getmntent(void)
*/
struct _lu_mntent {
_lu_string mnt_fsname;
_lu_string mnt_dir;
_lu_string mnt_type;
_lu_string mnt_opts;
int mnt_freq;
int mnt_passno;
};
typedef _lu_mntent *_lu_mntent_ptr;
/*
* Calls available:
* _lu_prdb_ent * prdb_getbyname
* _lu_prdb_ent<> prdb_get(void)
*/
struct _lu_prdb_property {
_lu_string pp_key;
_lu_string pp_value;
};
struct _lu_prdb_ent {
_lu_string pe_names<_LU_MAXPRNAMES>;
_lu_prdb_property pe_props<_LU_MAXPRPROPS>;
};
typedef _lu_prdb_ent *_lu_prdb_ent_ptr;
/*
* Calls available:
* _lu_bootp_ent * bootp_getbyip(unsigned long addr)
* _lu_bootp_ent * bootp_getbyether(opaque bootp_enaddr[6])
*/
struct _lu_bootp_ent {
_lu_string bootp_name;
_lu_string bootp_bootfile;
unsigned long bootp_ipaddr;
opaque bootp_enaddr[6];
};
typedef _lu_bootp_ent *_lu_bootp_ent_ptr;
/*
* Calls available:
* _lu_bootparams_ent * bootparams_getbyname(_lu_string name)
*/
struct _lu_bootparams_ent {
_lu_string bootparams_keyvalues<_LU_MAX_BOOTPARAMS_KV>;
};
typedef _lu_bootparams_ent *_lu_bootparams_ent_ptr;
/*
* Calls available:
* _lu_aliasent * alias_getbyname(_lu_string name)
* _lu_aliasent<> alias_getent(void)
*/
struct _lu_aliasent {
_lu_string alias_name;
_lu_string alias_members<_LU_MAXALIASMEMBERS>;
int alias_local;
};
typedef _lu_aliasent *_lu_aliasent_ptr;
/*
* Calls available:
* int innetgr(_lu_innetgr_args args)
* _lu_netgrent<> getnetgrent(_lu_string group)
*/
struct _lu_innetgr_args {
_lu_string group;
_lu_string *host;
_lu_string *user;
_lu_string *domain;
};
struct _lu_netgrent{
_lu_string ng_host;
_lu_string ng_user;
_lu_string ng_domain;
};